﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MessageShow.aspx.cs" Inherits="Com.CMS263.Web.manage.MessageManage.MessageShow" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    <script language="javascript" src="/manage/js/jquery-1.4.2.min.js"></script>

    <link href="/manage/css/common.css" rel="stylesheet" type="text/css" />
    <link href="/manage/css/main.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">
        function del(id, obj) {
            if (confirm('这是一个不可逆的操作，真的要删除此条记录')) {
                $.post("action.aspx", { id: id }, function(data) {
                    if (data == "ok") {
                        alert('删除成功');
                        window.location.href = "MessageList.aspx?page=<%=page %>";
                    }
                })
            }
        }
        function checkInput() {
            var con = $("#txtMessage").val();
            if (con.length < 1) {
                alert("请输入回复内容");
                return false;
            }
        }
    </script>

</head>
<body>
    <form id="form1" runat="server" enctype="multipart/form-data">
    <div class="main">
        <div class="mainMenu">
            <div class="mainMenuList">
                <ul>
                    <li class="s"><a><b>查看在线交流</b><span></span></a></li>
                    <li><a href="MessageList.aspx?page=<%=page %>"><b>在线交流列表</b><span></span></a></li>
                </ul>
            </div>
        </div>
        <div class="mainContent">
            <div class="con1 productForm">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table1">
                    
                    <tr>
                        <td class="l">
                            姓名:
                        </td>
                        <td>
                            <%=mes.UserName %>
                        </td>
                    </tr>
                    <tr>
                        <td class="l">
                            留言内容:
                        </td>
                        <td>
                            <%=mes.Contents %>
                        </td>
                    </tr>
                    
                    <tr>
                        <td class="l">
                            提交时间:
                        </td>
                        <td>
                            <span style="color: Red">
                                <%=mes.AddDate.ToString() %></span>
                        </td>
                    </tr>
                    <tr>
                        <td class="l">
                            回复内容:
                        </td>
                        <td>
                            <textarea id="txtMessage" name="txtMessage" cols="" rows="" style="width: 325px; height: 154px;"></textarea>
                        </td>
                    </tr>
                    
                    <tr>
                        <td colspan="2">
                            <div class="con1 productFormBtn cf">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="r">
                        </td>
                        <td style="margin-left: 200px">
                            <asp:Button ID="btnSave" runat="server" Text="回复" 
                                OnClientClick="return checkInput()" onclick="btnSave_Click" />
                            <input type="button" name="btnBack" value="返回" onclick='javascript:window.location.href="MessageList.aspx?page=<%=page %>"' />
                            <input type="button" name="btnDel" value="删除" onclick="del(<%=mes.Id %>)" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
